package cn.snowsoft.iot.module.cps.dal.dataobject.device;


import cn.snowsoft.iot.framework.mybatis.core.entity.TenantEntity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 设备表
 *
 * @author chen_gang
 * @TableName cps_device
 */
@TableName(value = "cps_device")
@Data
@EqualsAndHashCode(callSuper = true)
public class Device extends TenantEntity {


    /**
     * 乐观锁
     */
    @TableField(value = "revision")
    private Integer revision;

    /**
     * 备注
     */
    @TableField(value = "remark")
    private String remark;

    /**
     * 设备编码
     */
    @TableField(value = "device_code")
    private String deviceCode;

    /**
     * 设备名称
     */
    @TableField(value = "device_name")
    private String deviceName;

    /**
     * 模型编码
     */
    @TableField(value = "model_code")
    private String modelCode;

    /**
     * 子模型编码
     */
    @TableField(value = "sub_model_code")
    private String subModelCode;

    /**
     * 模型名称
     */
    @TableField(value = "model_name")
    private String modelName;

    /**
     * 子模型名称
     */
    @TableField(value = "sub_model_name")
    private String subModelName;

    /**
     * 设备类型
     */
    @TableField(value = "device_type")
    private String deviceType;

    /**
     * 设备key
     */
    @TableField(value = "device_key")
    private String deviceKey;

    /**
     * 协议编码
     */
    @TableField(value = "protocol_code")
    private String protocolCode;

    /**
     * 协议名称
     */
    @TableField(value = "protocol_name")
    private String protocolName;

    /**
     * 物理位置编码
     */
    @TableField(value = "location_code")
    private String locationCode;

    /**
     * 物理位置名称
     */
    @TableField(value = "location_name")
    private String locationName;

    /**
     * 逻辑位置编码
     */
    @TableField(value = "net_code")
    private String netCode;

    /**
     * 逻辑位置名称
     */
    @TableField(value = "net_name")
    private String netName;

    /**
     * 标签集合
     */
    @TableField(value = "device_tags")
    private String deviceTags;

    /**
     * 消息主题
     */
    @TableField(value = "topic_url")
    private String topicUrl;

    @TableField(value = "protocol_params")
    private String protocolParams;

    /**
     * 是否启用
     */
    @TableField(value = "is_enable")
    private String isEnable;
    /**
     * 关联数据采集的主键id
     */
    @TableField(value = "monitoring_id")
    private String monitoringId;
    @TableField(value = "identification")
    private Integer identification;

    @TableField(exist = false)
    private Long normal;
    @TableField(exist = false)
    private Long abnormal;
    @TableField(exist = false)
    private String gaugingType;
    /**
     * 设备图片
     */
    @TableField(exist = false)
    private String devicePicture;
	/**
	 * 节点编号
	 */
	@TableField(value = "node_code")
	private String nodeCode;
    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}
